package ro.prjmanager.web;

import org.json.JSONObject;
import ro.prjmanager.core.list.TabelOutJson;
import ro.prjmanager.core.list.RowJson;

/**
 * AnalyzeErrorsBase.java
 * <p/>
 * Copyright (c) 2009 Teamnet. All Rights Reserved.
 * <p/>
 * This source file may not be copied, modified or redistributed,
 * in whole or in part, in any form or for any reason, without the express
 * written consent of Teamnet.
 */
public class Test {
    public static void main(String[] args) {
        RowJson row=new RowJson(5);

        row.setCellByNo(0,"ZW");
        row.setCellByNo(1,"ZIMBABWE");
        row.setCellByNo(2,"Zimbabwe");
        row.setCellByNo(3,"ZWE");
        row.setCellByNo(4,"716");
        row.setId("ZW");

        TabelOutJson tabelOutJson=new TabelOutJson(10,1,1,1,10);
        tabelOutJson.setPage(1);
        tabelOutJson.setTotal(25);
        tabelOutJson.setRowByNo(0,row);

        row=new RowJson(5);
        row.setCellByNo(0,"ZM");
        row.setCellByNo(1,"ZAMBIA");
        row.setCellByNo(2,"Zambia");
        row.setCellByNo(3,"ZMB");
        row.setCellByNo(4,"894");
        row.setId("ZM");
        tabelOutJson.setRowByNo(1,row);

        row=new RowJson(5);
        row.setCellByNo(0,"ZM");
        row.setCellByNo(1,"ZAMBIA");
        row.setCellByNo(2,"Zambia");
        row.setCellByNo(3,"ZMB");
        row.setCellByNo(4,"894");
        row.setId("ZM");
        tabelOutJson.setRowByNo(2,row);

        row=new RowJson(5);
        row.setCellByNo(0,"ZM");
        row.setCellByNo(1,"ZAMBIA");
        row.setCellByNo(2,"Zambia");
        row.setCellByNo(3,"ZMB");
        row.setCellByNo(4,"894");
        row.setId("ZM");
        tabelOutJson.setRowByNo(3,row);

        row=new RowJson(5);
        row.setCellByNo(0,"ZM");
        row.setCellByNo(1,"ZAMBIA");
        row.setCellByNo(2,"Zambia");
        row.setCellByNo(3,"ZMB");
        row.setCellByNo(4,"894");
        row.setId("ZM");
        tabelOutJson.setRowByNo(4,row);

        row=new RowJson(5);
        row.setCellByNo(0,"ZM");
        row.setCellByNo(1,"ZAMBIA");
        row.setCellByNo(2,"Zambia");
        row.setCellByNo(3,"ZMB");
        row.setCellByNo(4,"894");
        row.setId("ZM");
        tabelOutJson.setRowByNo(5,row);

        row=new RowJson(5);
        row.setCellByNo(0,"ZM");
        row.setCellByNo(1,"ZAMBIA");
        row.setCellByNo(2,"Zambia");
        row.setCellByNo(3,"ZMB");
        row.setCellByNo(4,"894");
        row.setId("ZM");
        tabelOutJson.setRowByNo(6,row);

        row=new RowJson(5);
        row.setCellByNo(0,"ZM");
        row.setCellByNo(1,"ZAMBIA");
        row.setCellByNo(2,"Zambia");
        row.setCellByNo(3,"ZMB");
        row.setCellByNo(4,"894");
        row.setId("ZM");
        tabelOutJson.setRowByNo(7,row);

        row=new RowJson(5);
        row.setCellByNo(0,"ZM");
        row.setCellByNo(1,"ZAMBIA");
        row.setCellByNo(2,"Zambia");
        row.setCellByNo(3,"ZMB");
        row.setCellByNo(4,"894");
        row.setId("ZM");
        tabelOutJson.setRowByNo(8,row);

        row=new RowJson(5);
        row.setCellByNo(0,"ZM");
        row.setCellByNo(1,"ZAMBIA");
        row.setCellByNo(2,"Zambia");
        row.setCellByNo(3,"ZMB");
        row.setCellByNo(4,"894");
        row.setId("ZM");
        tabelOutJson.setRowByNo(9,row);

        JSONObject jsonObject=new JSONObject(tabelOutJson);
        System.out.println(jsonObject.toString());





    }
}
